package com.liyiruo.tx.service.main2;

import com.liyiruo.tx.mapper.TableBMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author liyiruo
 * @Description
 * @Date 2022/2/18 下午5:12
 */
@Service(value = "testBe2")
public class TestBe {
    @Autowired
    private TableBMapper tableBMapper;

    @Transactional(propagation = Propagation.REQUIRED)
    public void testB() {
        tableBMapper.addTableB();
        int i = 1 / 0;
        tableBMapper.addTableB();
    }
}
